acspyexmplFridgeNCConsumer
index
/diska/alma_tmp/ACS/LGPL/CommonSoftware/acspyexmpl/src/acspyexmplFridgeNCConsumer.py

DESCRIPTION
This trivial example shows how to consume events from a notification channel in 
Python using the standard FRIDGE::temperatureDataBlockEvent example. This particular
example does not return control until five events have been received.
 
WHAT CAN I GAIN FROM THIS EXAMPLE?
- Consumer class usage.
- Consuming events.
- Implementation of so-called handler functions to process event data.
 
LINKS
-

 
Modules
       
FRIDGE

 
Functions
       
fridgeDataHandler(someParam)
This function serves only one purpose...it must do something with the extracted
data from the structured event.  That is, it must be capable of processing
filterable_data[0].any in the structured event.  We can be certain of the real
type of someParam because handlers are registered only for specific
types (i.e., the type_name field of a structured event).
 
Parameters: someParam is the real CORBA type extracted from the CORBA Any at
filterable_data[0].  In this case, it will always be a FRIDGE.temperatureDataBlockEvent.
 
Returns: event handler functions return nothing.
 
Raises: If any exception is thrown by this function, the Consumer class will
catch it and call processEvent(...) which will hopefully have been overriden.
sleep(...)
sleep(seconds)
 
Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.

 
Data
        LOGGER = <Acspy.Common.Log.Logger instance at 0xb794aacc>
count = 0